// 根据id、class、tag获取第一个匹配到的值
function getDom(selector, type = 'id') {

    let getDomBy = {
      id(selector) {
        return document.getElementById(selector);
      },
    };
  
    return getDomBy[type](selector);
  }
  
  // echarts的title样式
  const defaultEchartsOpt = {
    title: {
      text: "",
      left: "center",
      top: 20,
      textStyle: {
        color: "#666"
      }
    }
  }
  
  export default {
    getDom,
    defaultEchartsOpt
  }
  
  